import request from '@/utils/axios'
import {
  URL_API
} from '@/utils/mUtils'
const base = URL_API()


//对账管理
//客户详情汇总列表  
export function reqCustomerSummaryList(params) {
  return request({
    url: `${base}/api/finance/customer/sender/list`,
    method: 'post',
    data: params,
  })
}

//承运商详情汇总列表  
export function reqCarrierSummaryList(params) {
  return request({
    url: `${base}/api/finance/customer/carrier/list`,
    method: 'post',
    data: params,
  })
}

//客户详情列表 
export function reqCustomerSDetailList(params) {
  return request({
    url: `${base}/api/finance/customer/sender/detail`,
    method: 'post',
    data: params,
  })
}

//承运商详情列表 
export function reqCarrierSDetailList(params) {
  return request({
    url: `${base}/api/finance/customer/carrier/detail`,
    method: 'post',
    data: params,
  })
}

//创建对账单
export function toCheck(params) {

  return request({
    url: `${base}/api/finance/customer/create`,
    method: 'post',
    data: params,

  })
}


//客户对账单列表汇总列表 
export function getCustomerCheckedList(params) {

  return request({
    url: `${base}/api/finance/customer/list`,
    method: 'post',
    data: params,

  })
}


//承运商对账单列表汇总列表 
export function getCarrierCheckedList(params) {

  return request({
    url: `${base}/api/finance/carrier/list`,
    method: 'post',
    data: params,

  })
}

//对账单列表详情 
export function getCheckedDetailList(params) {

  return request({
    url: `${base}/api/finance/customer/detail`,
    method: 'post',
    data: params,

  })
}

//修改对账单金额
export function modifyCheckFees(params) {

  return request({
    url: `${base}/api/finance/adjustment/adjust_account`,
    method: 'post',
    data: params,

  })
}

//获取对账单里面运单/关联单的金额
export function reqCheckWaybillFees(params) {

  return request({
    url: `${base}/api/finance/adjustment/adjust_relation_detail`,
    method: 'post',
    data: params,

  })
}


//修改对账单里面运单/关联单的金额
export function modifyCheckWaybillFees(params) {

  return request({
    url: `${base}/api/finance/adjustment/adjust_relation`,
    method: 'post',
    data: params,

  })
}

//修改对账单保存
export function modifyCheck(params) {

  return request({
    url: `${base}/api/finance/customer/update`,
    method: 'put',
    data: params,

  })
}

export function modifyCarrierCheck(params) {

  return request({
    url: `${base}/api/finance/carrier/update`,
    method: 'put',
    data: params,

  })
}

//客户的调账日志
export function reqCustomerCheckLog(params) {

  return request({
    url: `${base}/api/finance/adjustment/adjust_account_log`,
    method: 'post',
    data: params,

  })
}



//删除对账单
export function deleteCheck(params) {

  return request({
    url: `${base}/api/finance/customer/delete`,
    method: 'delete',
    data: params,

  })
}

export function deleteCarrierCheck(params) {

  return request({
    url: `${base}/api/finance/carrier/delete`,
    method: 'delete',
    data: params,

  })
}

//发送对账单
export function reqSendCheckPage(params) {

  return request({
    url: `${base}/api/finance/customer/send_account`,
    method: 'put',
    data: params,

  })
}

export function reqSendCarrierCheckPage(params) {

  return request({
    url: `${base}/api/finance/carrier/send_account`,
    method: 'put',
    data: params,

  })
}

//通过对账单
export function reqAdoptCheck(params) {

  return request({
    url: `${base}/api/finance/customer/review`,
    method: 'put',
    data: params,

  })
}

export function reqAdoptCarrierCheck(params) {

  return request({
    url: `${base}/api/finance/carrier/review`,
    method: 'put',
    data: params,

  })
}

//对账单异常
export function reqUnusualCheck(params) {

  return request({
    url: `${base}/api/finance/customer/refuse`,
    method: 'put',
    data: params,

  })
}

export function reqUnusualCarrierCheck(params) {

  return request({
    url: `${base}/api/finance/carrier/refuse`,
    method: 'put',
    data: params,

  })
}


//已申请，待开，已开，作废发票列表
export function reqReceiptList(params) {

  return request({
    url: `${base}/api/finance/invoice/list_by_status`,
    method: 'post',
    data: params,

  })
}

//待申请发票列表
export function reqReceiptReturnList(params) {

  return request({
    // url: `${base}/api/finance/invoice/wait/list`,
    url: `${base}/api/finance/invoice_apply/list`,
    method: 'post',
    data: params,

  })
}

//申请开票
export function reqReceiptReturn(params) {

  return request({
    url: `${base}/api/finance/invoice/apply_for_invoice`,
    method: 'post',
    data: params,

  })
}


//审核发票
export function reqAuditReceipt(params) {

  return request({
    // url: `${base}/api/finance/invoice/audit`,
    url: `${base}/api/finance/invoice_apply/cancel_review`,
    method: 'post',
    data: params,

  })
}

//开票
export function reqAdoptReceipt(params) {

  return request({
    // url: `${base}/api/finance/invoice/make_out_invoice`,
    url: `${base}/api/finance/invoice_apply/make_out_invoice`,
    method: 'post',
    data: params,

  })
}

//作废、取消开票
export function reqCancelReceipt(params) {

  return request({
    // url: `${base}/api/finance/invoice/update_status`,
    url: `${base}/api/finance/invoice_apply/nullify`,
    method: 'post',
    data: params,

  })
}

//修改开票
export function reqEditReceipt(params) {

  return request({
    url: `${base}/api/finance/invoice/update`,
    method: 'put',
    data: params,

  })
}

//发票详情
export function reqReceiptInfo(params) {

  return request({
    url: `${base}/api/finance/invoice/detail`,
    method: 'post',
    data: params,

  })
}

//历史发票详情
export function reqHistoryReceiptInfo(params) {

  return request({
    url: `${base}/api/finance/invoice/old/detail`,
    method: 'post',
    data: params,

  })
}

//发票簿的下拉
export function reqReceiptBookList(params) {

  return request({
    url: `${base}/api/finance/invoice_book/options`,
    method: 'post',
    data: params,

  })
}

//红冲
export function reqRedFlushReceipt(params) {

  return request({
    url: `${base}/api/finance/invoice/red_flush`,
    method: 'post',
    data: params,

  })
}

//应收管理
//待回款已核销列表 
export function reqReceivableList(params) {

  return request({
    url: `${base}/api/finance/receivable/list`,
    method: 'post',
    data: params,

  })
}

//应收详情
export function reqReceivableInfo(params) {

  return request({
    url: `${base}/api/finance/receivable/detail`,
    method: 'post',
    data: params,

  })
}

//应收编辑
export function reqReceivableEdit(params) {

  return request({
    url: `${base}/api/finance/receivable/update`,
    method: 'post',
    data: params,

  })
}

//应收核销或取消核销
export function reqReceivableVerification(params) {

  return request({
    url: `${base}/api/finance/receivable/update_status`,
    method: 'post',
    data: params,

  })
}

//应付管理
//申请付款
export function reqApplyForPayment(params) {

  return request({
    url: `${base}/api/finance/payable/create`,
    method: 'post',
    data: params,

  })
}

//修改付款
export function reqEditPayment(params) {

  return request({
    url: `${base}/api/finance/payable/record/update`,
    method: 'post',
    data: params,

  })
}

//付款详情
export function reqPaymentInfo(params) {

  return request({
    url: `${base}/api/finance/payable/record/detail`,
    method: 'post',
    data: params,

  })
}

//待付款和已核销列表 
export function reqCopeWithList(params) {

  return request({
    url: `${base}/api/finance/payable/list`,
    method: 'post',
    data: params,

  })
}

//应付详情
export function reqCopeWithInfo(params) {

  return request({
    url: `${base}/api/finance/payable/detail`,
    method: 'post',
    data: params,

  })
}

//应付编辑
export function reqCopeWithEdit(params) {

  return request({
    url: `${base}/api/finance/payable/update`,
    method: 'post',
    data: params,

  })
}

//应付核销或取消核销
export function reqCopeWithVerification(params) {

  return request({
    url: `${base}/api/finance/payable/update_status`,
    method: 'post',
    data: params,

  })
}


// 报销管理创建
export function reimburseCreate(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/create`,
    method: 'post',
    data: params,

  })
}
// 报销管理编辑
export function reimburseDetail(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/detail`,
    method: 'post',
    data: params,

  })
}
// 报销管理修改
export function reimburseUpdate(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/update`,
    method: 'post',
    data: params,

  })
}
// 删除报销管理
export function reimburseDelete(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/delete`,
    method: 'post',
    data: params,

  })
}
// 审核功能
export function reimburseReview(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/review`,
    method: 'post',
    data: params,

  })
}
// 打款详情页面
export function paymentDetail(params) {
  return request({
    url: `${base}/api/finance/reimburse/payment/detail`,
    method: 'post',
    data: params,

  })
}
// 保存
export function paymentUpdate(params) {
  return request({
    url: `${base}/api/finance/reimburse/payment/update`,
    method: 'post',
    data: params,

  })
}
// 保存核销
export function paymentWriteoff(params) {
  // // console.log(params)
  return request({
    url: `${base}/api/finance/reimburse/payment/write_off`,
    method: 'post',
    data: params,

  })
}
// 取消核销
export function cancelPayment(params) {
  // // console.log(params)
  return request({
    url: `${base}/api/finance/reimburse/cancel_payment`,
    method: 'post',
    data: params,

  })
}
// 报销管理列表
export function reimburseList(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/list`,
    method: 'post',
    data: params,

  })
}
// 报销单导出功能
export function reimburseExport(params) {
  return request({
    url: `${base}/api/finance/reimburse/export`,
    method: 'post',
    data: params,

  })
}
// 报销带你取消审核接口
export function reimburseCancelPayment(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/cancel_review`,
    method: 'post',
    data: params,

  })
}
// 导出功能
export function payableExport(params) {
  return request({
    url: `${base}/api/finance/payable/export`,
    method: 'post',
    data: params,
  })
}

// 客户对账单导出
export function reqOutPutCustomer(params) {
  return request({
    url: `${base}/api/finance/customer/sender/export`,
    method: 'post',
    data: params,
  })
}

// 承运商对账单导出
export function reqOutPutCarrier(params) {
  return request({
    url: `${base}/api/finance/customer/carrier/export`,
    method: 'post',
    data: params,
  })
}

// 报销承运列表

export function carrierList(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/carrier/list`,
    method: 'post',
    data: params,
  })
}

// 支付流水管理列表
export function reqPaymentStatementList(params) {
  return request({
    url: `${base}/api/wechatpay/log/list`,
    method: 'post',
    data: params,
  })
}
// 申请退款审核列表
export function WechatpayRefundList(params) {
  return request({
    url: `${base}/api/wechatpay/order/refund/list`,
    method: 'post',
    data: params,
  })
}
// 申请退款审核驳回
export function WechatpayAuditReject(params) {
  return request({
    url: `${base}/api/wechatpay/order/refund/audit/reject`,
    method: 'post',
    data: params,
  })
}
// 申请退款审核通过
export function WechatpayAuditPass(params) {
  return request({
    url: `${base}/api/wechatpay/order/refund/audit/pass`,
    method: 'post',
    data: params,
  })
}
// 申请退款提交
export function WechatpayRefundAdd(params) {
  return request({
    url: `${base}/api/wechatpay/order/online/refund`,
    method: 'post',
    data: params,
  })
}
// 申请退款提交-运单
export function WaybillpayRefundAdd(params) {
  return request({
    url: `${base}/api/wechatpay/order/waybill/online/refund`,
    method: 'post',
    data: params,
  })
}
// 申请退款详情
export function WechatpayRefundDetail(params) {
  return request({
    url: `${base}/api/wechatpay/order/refund/detail`,
    method: 'post',
    data: params,
  })
}
// 申请退款编辑
export function WechatpayRefundUpdate(params) {
  return request({
    url: `${base}/api/wechatpay/order/online/refund/update`,
    method: 'post',
    data: params,
  })
}
// 申请退款编辑-运单
export function WaybillpayRefundUpdate(params) {
  return request({
    url: `${base}/api/wechatpay/order/waybill/online/refund/update`,
    method: 'post',
    data: params,
  })
}
// 申请退款取消
export function WechatpayRefundCancel(params) {
  return request({
    url: `${base}/api/wechatpay/order/online/refund/repeal`,
    method: 'post',
    data: params,
  })
}
// 申请退款取消
export function WaybillpayRefundCancel(params) {
  return request({
    url: `${base}/api/wechatpay/order/waybill/online/refund/repeal`,
    method: 'post',
    data: params,
  })
}
// 备用金申请列表接口
export function Petty_cash_apply_list(params) {
  return request({
    url: `${base}/api/finance/petty_cash_apply/list`,
    method: 'post',
    data: params,
  })
}
// 备用金账号的创建接口
export function Petty_cash_apply_create(params) {
  return request({
    url: `${base}/api/finance/petty_cash_apply/create`,
    method: 'post',
    data: params,
  })
}
// 备用金删除接口
export function petty_cash_apply_delete(params) {
  return request({
    url: `${base}/api/finance/petty_cash_apply/delete`,
    method: 'post',
    data: params,
  })
}
// 备用金详情接口
export function petty_cash_apply_detail(params) {
  return request({
    url: `${base}/api/finance/petty_cash_apply/detail`,
    method: 'post',
    data: params,
  })
}
// 备用金更新接口
export function petty_cash_apply_update(params) {
  return request({
    url: `${base}/api/finance/petty_cash_apply/update`,
    method: 'post',
    data: params,
  })
}
// 收款备用金账号
export function invoice_book_box(params) {
  return request({
    url: `${base}/api/finance/invoice_book/petty_cash_box`,
    method: 'post',
    data: params,
  })
}
// 备用金申请
export function petty_cash_apply_send_review(params) {
  return request({
    url: `${base}/api/finance/petty_cash_apply/send_review`,
    method: 'post',
    data: params,
  })
}
// 备用金撤回申请
export function petty_cash_apply_cancel_review(params) {
  return request({
    url: `${base}/api/finance/petty_cash_apply/cancel_review`,
    method: 'post',
    data: params,
  })
}
// 发送审核
export function invoice_apply_send_revieww(params) {
  return request({
    url: `${base}/api/finance/invoice_apply/send_review`,
    method: 'post',
    data: params,
  })
}
// 删除发票申请
export function finance_invoice_apply_delete(params) {
  return request({
    url: `${base}/api/finance/invoice_apply/delete`,
    method: 'post',
    data: params,
  })
}
// 区域月付
export function finance_regional_monthly_payment_detail(params) {
  return request({
    url: `${base}/api/finance/regional_monthly_payment/detail`,
    method: 'post',
    data: params,
  })
}
// 区域月付导出
export function finance_regional_monthly_payment_export(params) {
  return request({
    url: `${base}/api/finance/regional_monthly_payment/export`,
    method: 'post',
    data: params,
  })
}
// 回款功能
export function finance_customer_receivable(params) {
  return request({
    url: `${base}/api/finance/customer/receivable`,
    method: 'post',
    data: params,
  })
}
// 获取收款人接口
export function finance_invoice_book_options(params) {
  return request({
    url: `${base}/api/finance/invoice_book/options`,
    method: 'post',
    data: params,
  })
}
// 承运商对账单导出
export function finance_carriers_list_export(params) {
  return request({
    url: `${base}/api/finance/carrier/list/export`,
    method: 'post',
    data: params,
  })
}
// 客户对账单导出
export function finance_customer_list_export(params) {
  return request({
    url: `${base}/api/finance/customer/list/export`,
    method: 'post',
    data: params,
  })
}
// 报销管理的导出
export function finance_reimburse_apply_list_export(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/list/export`,
    method: 'post',
    data: params,
  })
}
// 备用金申请导出
export function finance_petty_cash_apply_list_export(params) {
  return request({
    url: `${base}/api/finance/petty_cash_apply/list/export`,
    method: 'post',
    data: params,
  })
}
// 应收管理的导出
export function finance_receivable_list_export(params) {
  return request({
    url: `${base}/api/finance/receivable/list/export`,
    method: 'post',
    data: params,
  })
}
// 应收管理的导出
export function reimburse_apply_carry_export(params) {
  return request({
    url: `${base}/api/finance/reimburse_apply/detail/carry/export`,
    method: 'post',
    data: params,
  })
}
// 客户对账单取消通过
export function finance_customer_cancel(params) {
  return request({
    url: `${base}/api/finance/customer/cancel`,
    method: 'post',
    data: params,
  })
}
// 承运商对账单取消通过
export function finance_carrier_cancel(params) {
  return request({
    url: `${base}/api/finance/carrier/cancel`,
    method: 'post',
    data: params,
  })
}

// 用章申请创建
export function reqUseStampsCreate(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/create`,
    method: 'post',
    data: params,
  })
}

// 用章申请详情
export function reqUseStampsDetail(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/detail`,
    method: 'post',
    data: params,
  })
}

// 用章申请删除
export function reqUseStampsDelete(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/delete`,
    method: 'post',
    data: params,
  })
}

// 用章申请列表
export function reqUseStampsList(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/list`,
    method: 'post',
    data: params,
  })
}

// 用章申请更新
export function reqUseStampsUpdate(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/update`,
    method: 'post',
    data: params,
  })
}

// 用章申请发送审核
export function reqUseStampsSend(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/send_review`,
    method: 'post',
    data: params,
  })
}

// 用章申请取消审核
export function reqUseStampsCancel(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/cancel_review`,
    method: 'post',
    data: params,
  })
}

// 用章申请导出申请
export function reqUseStampsExport(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/export`,
    method: 'post',
    data: params,
  })
}

// 用章申请导出列表
export function reqUseStampsExportList(params) {
  return request({
    url: `${base}/api/finance/contract_stamp_apply/list_export`,
    method: 'post',
    data: params,
  })
}
// 采购申请列表
export function finance_purchase_apply_list(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/list`,
    method: 'post',
    data: params,
  })
}
// 采购申请创建
export function finance_purchase_apply_create(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/create`,
    method: 'post',
    data: params,
  })
}
// 采购申请详情
export function finance_purchase_apply_detail(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/detail`,
    method: 'post',
    data: params,
  })
}
// 采购申请修改
export function finance_purchase_apply_update(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/update`,
    method: 'post',
    data: params,
  })
}
// 采购申请修改
export function finance_purchase_apply_delete(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/delete`,
    method: 'post',
    data: params,
  })
}
// 采购列表导出
export function finance_purchase_apply_list_export(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/list_export`,
    method: 'post',
    data: params,
  })
}
// 采购列表导出
export function finance_purchase_apply_send_review(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/send_review`,
    method: 'post',
    data: params,
  })
}
// 采购申请导出
export function finance_purchase_apply_export(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/export`,
    method: 'post',
    data: params,
  })
}
// 采购申请取消审核
export function finance_purchase_apply_cancel_review(params) {
  return request({
    url: `${base}/api/finance/purchase_apply/cancel_review`,
    method: 'post',
    data: params,
  })
}
// 中通充值列表接口
export function zto_recharge_apply_list(params) {
  return request({
    url: `${base}/api/finance/zto_recharge_apply/list`,
    method: 'post',
    data: params,
  })
}
// 中通充值创建接口
export function zto_recharge_apply_create(params) {
  return request({
    url: `${base}/api/finance/zto_recharge_apply/create`,
    method: 'post',
    data: params,
  })
}
// 中通详情
export function zto_recharge_apply_detail(params) {
  return request({
    url: `${base}/api/finance/zto_recharge_apply/detail`,
    method: 'post',
    data: params,
  })
}
// 中通详情
export function zto_recharge_apply_update(params) {
  return request({
    url: `${base}/api/finance/zto_recharge_apply/update`,
    method: 'post',
    data: params,
  })
}
// 中通删除
export function zto_recharge_apply_delete(params) {
  return request({
    url: `${base}/api/finance/zto_recharge_apply/delete`,
    method: 'post',
    data: params,
  })
}
// 中通审批
export function zto_recharge_apply_send_review(params) {
  return request({
    url: `${base}/api/finance/zto_recharge_apply/send_review`,
    method: 'post',
    data: params,
  })
}
// 中通取消审批
export function zto_recharge_apply_cancel_review(params) {
  return request({
    url: `${base}/api/finance/zto_recharge_apply/cancel_review`,
    method: 'post',
    data: params,
  })
}
// 中通列表导出
export function zto_recharge_apply_list_export(params) {
  return request({
    url: `${base}/api/finance/zto_recharge_apply/list/export`,
    method: 'post',
    data: params,
  })
}
